home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 1.2 KB | 44 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWCharac.cpp
- // Release Version: $ 1.0d11 $
- //
- // Copyright: (c) 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #include "FWFound.hpp"
-
- #ifndef FWCHARAC_H
- #include "FWCharac.h"
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- #pragma segment Strings
-
- //----------------------------------------------------------------------------------------
- // FW_StringLength
- //----------------------------------------------------------------------------------------
-
- FW_CharacterCount FW_FUNC_ATTR FW_StringLength(const FW_Char * string)
- {
- register const FW_Char * s = string;
- const FW_Char nul = 0;
- while (*s++ != nul)
- {}
- return (s - string - 1);
- }
-
- // MetroWerks won't let me inline this. [AMB]
- //----------------------------------------------------------------------------------------
- // FW_CharsToBytes
- //----------------------------------------------------------------------------------------
-
- FW_ByteCount FW_CharsToBytes(FW_CharacterCount length)
- {
- return length*sizeof(FW_Char);
- }
-